// pages/posts/post.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    posts: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var posts = require('../../data/post.js').posts;
    this.setData({
      posts: posts
    });
  },
  gotoDetail:(event)=>{
    var postid = event.currentTarget.dataset.postid;
    //console.log(postid);
    wx:wx.navigateTo({
      url: '../detail/detail?id='+postid,
    })
    

  }
})